import { findHeadCategory } from '@/api/home'
export default {
  namespaced: true,
  state: {
    // 菜单分类数据
    list: []
  },
  mutations: {
    setList (state, list) {
      state.list = list
    }
  },
  actions: {
    async getListAction ({ commit }) {
      const res = await findHeadCategory()
      console.log('菜单数据', res)
      commit('setList', res)
    }
  }
}
